package com.ja.enumall;

/**
 * Created by 11936 on 2019/4/28.
 */
public enum  TypeEnum {
    GOUMAI("购买询价",0),CHULI("处理询价",1),BAOFEI("报废询价",2);

    private String statusName;
    private Integer statusValue;

    TypeEnum(String statusName, Integer statusValue) {
        this.statusName = statusName;
        this.statusValue = statusValue;
    }

    public static String getStatusName(Integer statusValue){
        for (TypeEnum typeEnum:TypeEnum.values()){
            if(typeEnum.getStatusValue() == statusValue){
                return typeEnum.getStatusName();
            }
        }
        return null;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public Integer getStatusValue() {
        return statusValue;
    }

    public void setStatusValue(Integer statusValue) {
        this.statusValue = statusValue;
    }
}
